	<div class="popup_guibai2 popup_detail popup_baicamnhan_detail" id="popup_detail" style="display:none ;">
            <div class="main_popup">
                <a class="close close_popup png" onclick="return close_Popup('contest');"><img src="<?php echo PATH_URL ?>static/images/btn_close2.png" class="png" alt="" /></a>
                <div class="detail_popup">
					<div class="left_popup">
						<div class="content_popup">
							<div>
								<div class="left">
                                    <div class="title"><?=$detail->name_category?></div>
									<div class="title"><?=$detail->title?></div>
									<div class="username"><?=$detail->username?> <span class="date">(<?=getVNDateTime($detail->created)?>)</span></div>
								</div>
								<div class="right binhchon"><span class="count_like"><?=$detail->like?></span>&nbsp;&nbsp;<img src="<?=PATH_URL.'static/images/img_sao.png'?>" alt="" class="png" />&nbsp;&nbsp;<a href="JavaScript:void(0);" onclick="return onlick_like(<?=$detail->id?>)" class="btn_binhchon"></a></div>
								<div class="clearAll"></div>
							</div>
							<div style="height: 10px;"></div>
							<div class="share">
								<div><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fmensbiore.vn%2Fkenh18%2FBan-Tron%2F191&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=true&amp;font&amp;colorscheme=light&amp;action=like&amp;height=25" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px;" allowTransparency="true"></iframe></div>
							  <div class="btn_share">Chia sẻ &nbsp &nbsp<a href="http://link.apps.zing.vn/pro/view/conn/share?fl=&u=<?= PATH_URL . '#/Contest-List/Bai-Cam-Nhan/' . $detail->id ?>/&t=<?= $detail->title ?>" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=700');return false;" ><img src="<?= PATH_URL . 'static/images/btn_zing.png' ?>" /></a><a href="JavaScript:void(0);" onclick="return share_facebook('<?= PATH_URL . '#/Contest-List/Bai-Cam-Nhan/' . $detail->id ?>','<?= $detail->title ?>','<?= $detail->title ?>','<?= PATH_URL . DIR_UPLOAD_BAIVIET . $detail->file ?>')"><img src="<?= PATH_URL . 'static/images/btn_facebook.png' ?>" /></a><a href="http://twitter.com/share?text=<?= $detail->title ?>&url=<?= PATH_URL . '#/Contest-List/Bai-Cam-Nhan/' . $detail->id ?>"><img src="<?= PATH_URL . 'static/images/btn_twiter.png' ?>" /></a><a href="mailto:autobay.vn@example.com?Subject=<?= $detail->title ?>"><img src="<?= PATH_URL . 'static/images/btn_email.png' ?>" /></a></div>
       	</div>
							<div class="content js_content">
                            <?=$detail->content?>
                            <div style="height: 20px;"></div>
							</div>
						</div>
						<div class="clearAll"></div>
						<div style="height:20px;"></div>
					</div>
					<div class="right_popup">
						<div class="comment_popup">
							<div class="count_comment"><img src="<?=PATH_URL.'static/images/btn_count_comment.png'?>"/> <b>BÌNH LUẬN</b> (<span id="total_cm"><?=$count_comment?></span>)</div>
							<div class="scroll_item">
                                <div class="list_comment mt10" id="list_comment_contest">
    								<?php  if ($comment > 0) {
                                     foreach ($comment as $k ) {
                                    ?>
                                    <div class="items">
    									<div class="comment_user"><?=$k->username?></div>
    									<div class="comment_content"><?=$k->comment?> </div>
    								</div>
                                    <?php }}?>
    							</div>
                            </div>
                            
							<div class="send_comment" style="margin-top:20px;">
								<div class="text_comment"><textarea onclick="this.value=''" style=" width:305px;border:1px solid #E5E5E5;height: 85px;" name="comment" id="txtcomment">Viết bình luận của bạn...</textarea></div>
                                <div class="clearAll"></div>
                            </div>
							<div class="div_btn_send txt_right"><a onclick="return post_comment();" class="btn_send_comment" id="0" href="JavaScript:void(0);"><img style="display:none" src="<?=PATH_URL.'static/images/btn/btn_send_comment_1.png'?>" class="loading"></a></div>
							<div class="erorr erorr1"></div>
						</div>
					</div>
					<div class="clearAll"></div>
				</div>
            </div> 
        </div>
	<script type="text/javascript">
    function updateLike(like){
    var obj = swfobject.getObjectById("swfcontent");
    if(obj && obj.updateLike) {
        obj.updateLike(like);
    } 
}
function updateComment(comment){
    var obj = swfobject.getObjectById("swfcontent");
    if(obj && obj.updateComment) {
        obj.updateComment(comment);
    } 
}
    function onlick_like(id)
    {
        var id = id;
        var url ="<?= PATH_URL ?>contest/ajax_like_contest";
        $.post(url,{contest_id:id},function(data){
                    if(data==1)
                    {
                        $('.count_like').html(parseInt($('.count_like').html())+1);
                        updateLike(parseInt($('.count_like').html()));
                        return false;
                    }
                    if(data == 0)
                    {
                        alert("Bạn vui lòng đăng nhập để bình chọn");
                        return false;
                    }
                    if(data == 4)
                    {
                        alert("Địa chỉ email của bạn chưa được xác nhận, bạn vui lòng kiểm tra email để xác nhận thông tin");
                        return false;
                    }
                    if(data == 2)
                    {
                        alert("Bạn đã bình chọn cho bài viết này !");
                        return false;
                    }
                    if(data == 3)
                    {
                        alert("Thời gian bình chọn đã kết thúc !");
                        return false;
                    }
                });
    }
    function post_comment()
     {
        var contest_id = <?=$detail->id?>;
        var comment = $("#txtcomment").val();
        if(comment == "" ||comment == "Viết bình luận của bạn...")
        {
            $(".erorr1").html('Bạn vui lòng nhập nội dung bình luận .');
            return false;
        }
        var url = '<?=PATH_URL?>contest/ajax_post_comment';
        $.post(url,{
            contest_id:contest_id,
            comment:comment
        },function(data){
            if(data != '0')
            {
               $(".scroll_item").html(data);
               $('.list_comment').jScrollPane();
               $("#txtcomment").val("");
               $('#total_cm').html(parseInt($('#total_cm').html())+1);
               updateComment(parseInt($('#total_cm').html()));
           
            }
            else
            {
                   $(".erorr1").html('Bạn vui lòng đăng nhập để bình luận.');
            }
            
        });
        return false;
     }
    </script>